package net.csdn.business.webhook.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.csdn.business.common.domain.query.WebhookConfigQuery;
import net.csdn.business.common.domain.request.webhook.DeleteWebhookConfigDTO;
import net.csdn.business.common.domain.request.webhook.NewWebhookConfigDTO;
import net.csdn.business.common.domain.request.webhook.UpdateWebhookConfigDTO;
import net.csdn.business.common.domain.vo.WebhookConfigVO;

import java.util.List;


/**
 * @ClassName webhook配置信息Service接口
 * @Description TODO
 * @Author zhangyl
 * @Date 2023/4/23 16:16
 */
public interface IWebhookConfigService
{

    /**
     * 分页查询webhook配置信息
     *
     * @param query webhook配置信息详细信息
     * @return webhook配置信息
     */
    public Page<WebhookConfigVO> findPageList(WebhookConfigQuery query) throws Exception;

    /**
     * 根据id查询webhook配置信息详细信息
     * 
     * @param id webhook配置信息主键
     * @return webhook配置信息
     */
    public WebhookConfigVO selectWebhookConfigById(String id) throws Exception;

    /**
     * 根据fromId查询webhook配置信息列表
     * 
     * @param fromId webhook配置主体id
     * @return webhook配置信息集合
     */
    public List<WebhookConfigVO> selectWebhookConfigList(String fromId);

    /**
     * 新增webhook配置信息
     * 
     * @param param webhook配置信息
     * @return 结果
     */
    public String insertWebhookConfig(NewWebhookConfigDTO param) throws Exception;

    /**
     * 修改webhook配置信息
     * 
     * @param param webhook配置信息
     * @return 结果
     */
    public Integer updateWebhookConfig(UpdateWebhookConfigDTO param) throws Exception;

    /**
     * 删除webhook配置信息信息
     * 
     * @param param 删除webhook配置信息主键
     * @return 结果
     */
    public Integer deleteWebhookConfigById(DeleteWebhookConfigDTO param);


    /**
     * @Author zhangyl
     * @Description 发送ping事件
     * @Date 14:16 2023/5/19
     * @Param
     * @return
     **/
    public void sendPing(String webhookId,NewWebhookConfigDTO params)throws Exception;
}
